package com.wangijun.yuan.web.model.dto;

import com.wangijun.yuan.core.base.YesNoEnum;
import com.wangijun.yuan.core.model.Group;
import com.wangijun.yuan.web.model.vo.SelectVO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 博客简介表
 */
@Schema(description = "博客简介表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ArticleParam {

    @NotNull(groups = Group.Update.class, message = "主键不可为空")
    @Schema(description = "主键")
    private Long id;

    /**
     * 摘要
     */
    @NotBlank(message = "文章摘要不可为空")
    @Schema(description = "摘要")
    private String summary;

    /**
     * 标题
     */
    @NotBlank(message = "文章标题不可为空")
    @Schema(description = "标题")
    private String title;
    /**
     * 封面
     */
    @Schema(description = "封面")
    private String articleCover;

    @Schema(description = "发布状态 1已发布;0未发布")
    private YesNoEnum status;


    @NotBlank(message = "文章内容不可为空")
    @Schema(description = "文章内容")
    private String content;

    @NotBlank(message = "文章Html预览不可为空")
    @Schema(description = "文章Html预览内容")
    private String htmlContent;

    @NotNull(message = "分类不可为空")
    @Schema(description = "分类ID")
    private Long categoryId;

    @Size(message = "标签不可为空")
    @Schema(description = "标签")
    private List<SelectVO> tagList;

    @Schema(description = "话题数据")
    private SelectVO topic;

}